return {
    {
        "mfussenegger/nvim-dap",
        keys = {
            {
                "<F5>",
                function()
                    require("dap").continue()
                end,
                desc = "dap continue",
            },
            {
                "<F10>",
                function()
                    require("dap").step_over()
                end,
                desc = "dap step over",
            },
            {
                "<F11>",
                function()
                    require("dap").step_into()
                end,
                desc = "dap step into",
            },
            {
                "<F12>",
                function()
                    require("dap").step_out()
                end,
                desc = "dap step out",
            },
            {
                "<leader>db",
                function()
                    require("dap").toggle_breakpoint()
                end,
                desc = "dap toggle point",
            },
            {
                "<leader>dB",
                function()
                    require("dap").set_breakpoint(vim.fn.input "Breakpoint condition: ")
                end,
                desc = "dap toggle point",
            },
        },
        config = function() end,
    },
    {
        "leoluz/nvim-dap-go",
        dependencies = { "mfussenegger/nvim-dap" },
        config = function()
            require("dap-go").setup {
                -- 可以覆盖默认配置
                dap_configurations = {
                    {
                        type = "delve",
                        name = "Debug package",
                        request = "launch",
                        program = "${fileDirname}",
                    },
                },
                delve = {
                    path = "dlv",
                    build_flags = "",
                },
            }
        end,
    },
    {
        "rcarriga/nvim-dap-ui",
        dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
        config = function()
            local dap = require "dap"
            local dapui = require "dapui"

            -- 基本配置
            dap.adapters.delve = {
                type = "server",
                port = "${port}",
                executable = {
                    command = "dlv",
                    args = { "dap", "-l", "127.0.0.1:${port}" },
                },
            }

            -- Go 调试配置
            dap.configurations.go = {
                {
                    type = "delve",
                    name = "Debug",
                    request = "launch",
                    program = "${file}",
                },
                {
                    type = "delve",
                    name = "Debug test", -- configuration for debugging test files
                    request = "launch",
                    mode = "test",
                    program = "${file}",
                },
                -- 更多配置...
            }

            -- DAP UI 配置
            dapui.setup()

            -- 自动打开/关闭 UI
            dap.listeners.after.event_initialized["dapui_config"] = function()
                dapui.open()
            end
            dap.listeners.before.event_terminated["dapui_config"] = function()
                dapui.close()
            end
            dap.listeners.before.event_exited["dapui_config"] = function()
                dapui.close()
            end
        end,
    },
    {
        "theHamsta/nvim-dap-virtual-text",
        dependencies = { "mfussenegger/nvim-dap" },
        config = function()
            require("nvim-dap-virtual-text").setup()
        end,
    },
}
